console.log(".........publicHeader...........");
let publicHeader = new Vue({
    el: "#publicHeaderApp",
    data: {
        currentAccount:'',
        keyword:''
    },
    methods: {
        initCurrentAccount(){
            let _this=this;
            $.get("/user/currentAccount",function (data) {
                _this.currentAccount=data;
            })
        }
        ,
        toSearch(){

            let _this=this;
            console.log(this.keyword)

            //搜索关键字不能为空
            if(!this.keyword){
                alert("搜索关键词不能为空")
                return;
            }

            //


            indexVueObj._data.keyword=this.keyword;
            indexVueObj.initAllProducts();

            // location.href="/product/search?keyword="+this.keyword;
        }

    },
    created() {

        console.log(this.keyword);



        this.initCurrentAccount();
    }
});
